/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.myyong.model;

import java.io.Serializable;
import java.util.List;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 *
 * @author dell
 */
@Document(collection = "post")
public class Post implements Serializable{
    @Id
    private ObjectId id;
    
    private String author;
    
    private List<Comments> comments;

    public Post() {
    }

    public ObjectId getId() {
        return id;
    }

    public void setId(ObjectId id) {
        this.id = id;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public List<Comments> getComments() {
        return comments;
    }

    public void setComments(List<Comments> comments) {
        this.comments = comments;
    }

    @Override
    public String toString() {
        return "Post{" + "id=" + id + ", author=" + author + ", comments=" + comments + '}';
    }
    
    
   
}
